package cn.edu.nju.software.zp13.client.assignment9UsingJAXB.assignment4Refactoring.scoreList2;

import cn.edu.nju.software.zp13.client.assignment3.xmlGenerator.XmlGenerator;
import cn.edu.nju.software.zp13.client.assignment9UsingJAXB.assignment4Refactoring.bean.CourseScoreList;
import cn.edu.nju.software.zp13.client.assignment9UsingJAXB.assignment4Refactoring.scoreList2.core.CourseScoreListDeserializer;
import cn.edu.nju.software.zp13.client.assignment9UsingJAXB.assignment4Refactoring.scoreList2.core.CourseScoreListSerializer;
import cn.edu.nju.software.zp13.client.assignment9UsingJAXB.assignment4Refactoring.scoreList2.core.CourseScoreSelector;
import cn.edu.nju.software.zp13.client.assignment9UsingJAXB.assignment4Refactoring.scoreList2.core.EmptyExtraXmlContent;

public class Main {
	public static void main(String[] args) {
		String prefix = System.getProperty("user.dir");
		CourseScoreList list = CourseScoreListDeserializer.run(prefix + "/xml"+ "/scoreList1.xml");
		CourseScoreList failed = CourseScoreSelector.getFailedCourseScoreList(list);
		XmlGenerator xg = new XmlGenerator();
		xg.setDom(CourseScoreListSerializer.serializeToDom(failed));
		xg.setXmlContent(new EmptyExtraXmlContent());
		xg.createXml(prefix
				+ "/xml/refactoring/scoreList2.xml");
	}
}
